// Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.

// event api定义
package router

import (
	"fleetmanager/api/controller/event"
	"github.com/beego/beego/v2/server/web"
)

func initEventRouters() {
	// event
	web.Router("/v1/:project_id/event", &event.EventController{}, "get:List")
	web.Router("/v1/:project_id/event/:event_id", &event.EventController{}, "get:ShowOrDelete;delete:ShowOrDelete")
	web.Router("/v1/:project_id/topic", &event.EventController{}, 
		"post:Topic;delete:Topic;get:Topic;put:Topic")
	web.Router("/v1/:project_id/topic/subscriptions/:topic_urn", &event.EventController{}, "post:AddOrCancelSubscription")
	web.Router("/v1/:project_id/topic/subscriptions/:subscription_urn", &event.EventController{}, "delete:AddOrCancelSubscription")
}